package top.hooray.delayedpayment.entity;

import javax.persistence.*;
import java.math.BigDecimal;

/**
 * @author hooray
 * @date 2021/3/9 22:35
 */
@Entity
@Table(name = "d_order_detail")
public class OrderDetail {

    @Id
    private Long itemId;

    @Column(nullable = false)
    private String itemName;

    /**
     * 价格
     */
    @Column(nullable = false)
    private BigDecimal itemPrice;

    /**
     * 数量
     */
    @Column(nullable = false)
    private Integer num;

    @Override
    public String toString() {
        return "OrderDetail{" +
                "itemId=" + itemId +
                ", itemName='" + itemName + '\'' +
                ", itemPrice=" + itemPrice +
                ", num=" + num +
                '}';
    }

    public Long getItemId() {
        return itemId;
    }

    public void setItemId(Long itemId) {
        this.itemId = itemId;
    }

    public String getItemName() {
        return itemName;
    }

    public void setItemName(String itemName) {
        this.itemName = itemName;
    }

    public BigDecimal getItemPrice() {
        return itemPrice;
    }

    public void setItemPrice(BigDecimal itemPrice) {
        this.itemPrice = itemPrice;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

}
